﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hiro.Containers;
using Mono.Cecil;

namespace Hiro.Interfaces
{
    /// <summary>
    /// Represents a type that can dynamically compile <see cref="IDependencyMap"/> instances
    /// into a running <see cref="IMicroContainer"/> instance.
    /// </summary>
    public interface IContainerCompiler
    {
        /// <summary>
        /// Compiles the given <see cref="IDependencyMap"/> instance into a single container type
        /// that implements the <see cref="IMicroContainer"/> interface.
        /// </summary>
        /// <param name="dependencyMap">The dependency map that describes the dependencies that need to be instantiated by the compiled container.</param>
        /// <returns>An assembly containing the compiled container.</returns>
        IMicroContainer Compile(IDependencyMap dependencyMap);
    }
}
